<@_placeMetadata path=path><#assign a=object/></@_placeMetadata>
<@_placeList path=path advanced=true status=status userId=userId startPublishDate=startPublishDate endPublishDate=endPublishDate
	orderField=orderField orderType=orderType pageIndex=pageNum count=numPerPage>
<div class="pageHeader">
	<form id="pagerForm" onsubmit="return navTabSearch(this);" method="post">
		<#include "../include_page/paramters.html"/>
		<div class="searchBar">
			<ul class="searchContent">
				<li class="colspan">
					<label>推荐位名称:</label><label>${a.alias!}</label>
				</li>
				<li class="width:auto">
					<#list 0..1 as s>
						<label style="width:auto">
							<input <@t.compare status!'' s?string 'checked="checked"'/> name="status" value="${s}" type="checkbox"/>
							<span><@t.m 'status.place.data.'+s/></span>
						</label>
					</#list>
				</li>
				<li>
					<label>发布用户:</label>
					<#include "../include_page/userId.html"/>
				</li>
				<li class="colspan">
					<label>发布日期:</label>
					<input type="text" name="startPublishDate" size="15" class="date" dateFmt="yyyy-MM-dd HH:mm:ss" value="${startPublishDate!}" />
					<span>-</span>
					<input type="text" name="endPublishDate" size="15" class="date" dateFmt="yyyy-MM-dd HH:mm:ss" value="${endPublishDate!}" />
				</li>
			</ul>
			<div class="subBar">
				<ul>
					<li>
						<button type="submit" class="buttonActive">搜索</button>
					</li>
				</ul>
			</div>
		</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a href="cmsPage/placeDataAdd.html?path=${(path?url!)}" target="navTab" rel="cmsPageData/add"><i class="icon-plus-sign-alt icon-large"></i> 添加推荐位数据</a></li>
			<li><a href="cmsPage/placeDataAdd.html?id={sid}" target="navTab" rel="cmsPageData/edit"><i class="icon-edit icon-large"></i> 修改推荐位数据</a></li>
			<li><a href="cmsPlace/refresh.do" title="确定要刷新这些记录么?" target="selectedTodo" rel="ids"><i class="icon-refresh icon-large"></i> 批量刷新</a></li>
			<li><a href="cmsPlace/check.do" title="确定要审核这些记录么?" target="selectedTodo" rel="ids"><i class="icon-check icon-large"></i> 批量审核</a></li>
			<#if site.useSsi>
				<li class="line">line</li>
				<li><a href="cmsTemplate/publishPlace.do?path=${(path?url!)}" target="ajaxTodo"><i class="icon-file-text-alt icon-large"></i> 发布</a></li>
			</#if>
			<li class="line">line</li>
			<li><a href="cmsPlace/delete.do" title="确定要删除这些记录么?" target="selectedTodo" rel="ids"><i class="icon-trash icon-large"></i> 批量删除</a></li>
			<li class="line">line</li>
			<li><a href="cmsPlace/clear.do?path=${(path?url!)}" title="确定要清空这些记录么?" target="ajaxTodo"><i class="icon-wrench icon-large"></i> 全部清空</a></li>
		</ul>
	</div>
	<table class="list" width="100%" layoutH="92">
		<thead>
			<tr>
				<th width="20"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
				<th width="30">ID</th>
				<th>标题</th>
				<th width="140" orderField="publishDate" class="<#if orderField??&&'publishDate'==orderField><#if 'asc'=orderType>asc<#else>desc</#if><#else>order</#if>">发布日期</th>
				<th width="140" orderField="createDate" class="<#if orderField??&&'createDate'==orderField><#if 'asc'=orderType>asc<#else>desc</#if><#else>order</#if>">创建日期</th>
				<th width="100">发布用户</th>
				<th width="80" orderField="clicks" class="<#if orderField??&&'clicks'==orderField><#if 'asc'=orderType>asc<#else>desc</#if><#else>order</#if>">点击数</th>
				<th width="50">状态</th>
				<th width="100">操作</th>
			</tr>
		</thead>
		<tbody>
	<#list page.list as a>
		<@t.merge 'userIds' a.userId!/>
	</#list>

	<@_sysUser ids=t.userIds!><#assign userMap=map!/></@_sysUser>
	<#list page.list as a>
			<tr target="sid" rel="${a.id}">
				<td><input name="ids" value="${a.id}" type="checkbox"></td>
				<td>${a.id}</td>
				<td><a href="${a.url}" target="_blank">${a.title}</a></td>
				<td>${a.publishDate}</td>
				<td>${a.createDate}</td>
				<td>${(userMap[a.userId?string].nickName)!}</td>
				<td>${a.clicks}</td>
				<td><@t.m 'status.place.data.'+a.status/></td>
				<td>
					<a href="cmsPage/placeDataAdd.html?id=${a.id}" target="navTab" rel="cmsPageData/edit" title="修改推荐位数据">修改</a>
					<#if 0=a.status>
						<a href="cmsPlace/check.do?ids=${a.id}" title="确定要审核这条记录么?" target="ajaxTodo">审核</a>
					</#if>
					<a href="cmsPlace/delete.do?ids=${a.id}" title="确定要删除这条记录么?" target="ajaxTodo">删除</a>
				</td>
			</tr>
	</#list>
		</tbody>
	</table>
	<#include "../include_page/page.html"/>
</div>
</@_placeList>